#include <mFS/FsTypes.h>

#include "APDUParse.h"
#include "SwCode.h"

#include <cmd/CMDxAuth.h>

#include "ApduProc_Handler_Utils.h"


void ApduProc_Handler_Utils(UINT8 Ins)
{
    switch(Ins)
	{
		case CMD_XAUTH_CREATE:
			CMDxAuth_Create();
			break;
		case CMD_XAUTH_ENROLL:
			CMDxAuth_Enroll();
			break;
		case CMD_XAUTH_VERIFY:
			CMDxAuth_Verify();
			break;
		case CMD_XAUTH_DELETE:
			CMDxAuth_Delete();
			break;
		case CMD_XAUTH_GETINFO:
			CMDxAuth_GetInfo();
			break;
		case CMD_XAUTH_SETCONFIG:
			CMDxAuth_SetConfig();
			break;
		case CMD_XAUTH_ENROLLVERIFYCANCEL: 
			CMDxAuth_EnrollVerifyCancel();
			break;
		case CMD_XAUTH_VERIFYEX1:
			CMDxAuth_VerifyEx1();
			break;
		case CMD_XAUTH_VERIFYEX2:
			CMDxAuth_VerifyEx2();
			break;
		default:
			APDU_SetRespond(0, ISOSW_INS_ERROR);
			break;
	}
	
	return ;
}
